<template>
<nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">众筹管理平台</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
        	
          <ul class="nav navbar-nav navbar-right">
          	<li><router-link to="/admin_index">首页</router-link></li>
          	<li><a href="#">欢迎, {{name}}</a></li>
            <li><a href="#" title="修改个人资料和密码的页面">设置</a></li>
            <li><a title="退出登录"  @click="tc()">退出</a></li>
            <!-- <label><a style="color:white" @click="tc()">退出</a></label> -->
          </ul>
        </div>
      </div>
    </nav>
</template>
<script>
export default {
    data(){
      return{
        name:""
      }
    },
    created(){
     this.name=localStorage.getItem("adminLoginName");
    },
    methods:{
        tc(){
            localStorage.removeItem('adminLoginName')
            // 清除cookie
            this.$clearCookie("adminToken")
            this.$router.push('/index')
            // location.reload();
        }
    }
}
</script>

<style scoped>

/* @import url('../../../public/css/bootstrap.min.css');
@import url('../../../public/css/dashboard.css'); */
</style>